<div class="demo">
  <nz-table
    #nzTable
    [nzData]="listOfData"
    (nzCurrentPageDataChange)="onPageChange($event)"
  >
    <thead>
      <tr>
        <th
          [nzChecked]="selectAll"
          (nzCheckedChange)="onSelectPage($event)"
          [nzIndeterminate]="indeterminate"
        >
          <span
            nz-icon
            nzType="down"
            nz-dropdown
            [nzDropdownMenu]="selectMenu"
          ></span>
          <nz-dropdown-menu #selectMenu>
            <ul nz-menu>
              <li nz-menu-item (click)="onSelectAll()">选择所有</li>
              <li nz-menu-item (click)="onSelectPage(true)">选择本页</li>
              <li nz-menu-item (click)="onSelectAll()">选择奇数行</li>
              <li nz-menu-item (click)="onSelectAll()">选择偶数行</li>
            </ul>
          </nz-dropdown-menu>
        </th>

        <th>Name</th>
        <th>Age</th>
        <th>Address</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let data of nzTable.data">
        <td
          [nzChecked]="isChecked(data)"
          (nzCheckedChange)="onSelectItem(data, $event)"
          [nzDisabled]="data.disabled"
        ></td>
        <td>{{ data.name }}</td>
        <td>{{ data.age }}</td>
        <td>{{ data.address }}</td>
      </tr>
    </tbody>
  </nz-table>

  <div>
    <ol>
      <li>全选/取消选择功能要自己开发</li>
      <li>部分选择要自己判断</li>
    </ol>
  </div>
</div>
